﻿
using System.ComponentModel.DataAnnotations;

namespace TrackSystem.Entities.Dtos.User
{
    public class UserForCreateDto
    {
        [Display(Name = "用户名")]
        public string? UserName { get; set; }

        [Display(Name = "电子邮箱")]
        [Required(ErrorMessage = "电子邮箱不能为空")]
        [EmailAddress(ErrorMessage = "电子邮箱格式不正确")]
        public string Email { get; set; } = string.Empty;

        [Display(Name = "手机号码")]
        [Required(ErrorMessage = "手机号码不能为空")]
        [Phone(ErrorMessage = "手机号码格式不正确")]
        public string PhoneNumber { get; set; } = string.Empty;

        [Display(Name = "密码")]
        [Required(ErrorMessage = "密码不能为空")]
        [DataType(DataType.Password)]
        public string Password { get; set; } = string.Empty;

        [Display(Name = "确认密码")]
        [DataType(DataType.Password)]
        [Compare("Password", ErrorMessage = "两次输入的密码不一致")]
        public string ConfirmPassword { get; set; } = string.Empty;
    }
}
